package com.insideClass.AnonymityInsideClass;

import java.util.HashMap;

/**
 * 错误示范
 * @param <T>
 */
class Manipulator<T>{
    private T obj;

    public Manipulator(T x) {
        this.obj = x;
    }
    public void manipulate(){
    }
}

/**
 * 正确示范 Manipulator2<T extends HasF
 * @param <T>
 */
class Manipulator2<T extends HasF>{
    private T obj;

    public Manipulator2(T x) {
        this.obj = x;
    }
    public void manipulate(){
        obj.f();
    }
}

/**
 * @author 13699
 */
public class Manipulation {
    public static void main(String[] args) {
        HasF hf=new HasF();
        Manipulator<HasF> manipulator=new Manipulator<>(hf);
        manipulator.manipulate();
    }
}
